{% extends 'base.html' %}


{% block title %}
<title>index</title>
{% endblock %}

{% block con %}


            <h3>Index</h3>

            <p>{{ n }}</p>
            <p>{{ i }}</p>
            <p>{{ info }}</p>
            <p>{{ l }}</p>
            <p>{{ alex }}</p>
            <p>{{ person_list }}</p>
            <p>{{ b }}</p>
            <hr>

            <h4>深度查询</h4>

            <p>{{ l.1 }}</p>
            <p>{{ info.name }}</p>
            <p>{{ alex.name }}</p>
            <p>{{ alex.age }}</p>

            <p>{{ person_list.1.age }}</p>

            <h4>过滤器</h4>

            <p>{{ now|date:"Y-m-d" }}</p>
            <p>{{ i|add:12 }}</p>
            <p>{{ l|length }}</p>
            <p>{{ file_size|filesizeformat }}</p>

            <p>{{ content|truncatechars:13 }}</p>
            <p>{{ content|truncatewords:3 }}</p>
            <p>{{ link|safe }}</p>
            <hr>
            <h4>for标签</h4>

            {% for i in l %}
                <p>{{ i }}</p>
            {% endfor %}


            {% for i in info %}
                <p>{{ i }}</p>
            {% endfor %}


            {% for person in person_list %}
                <p>{{ forloop.counter0 }} {{ person.name }} , {{ person.age }}</p>
            {% empty %}
                <p>列表为空</p>
            {% endfor %}


            <hr>

            {% if user %}
                <p>
                    <a href="">hi {{ user }}</a>
                    <a href="">注销</a>
                </p>

            {% else %}
                <p>
                    <a href=" ">登录</a>
                    <a href=" ">注册</a>
                </p>
            {% endif %}


            <hr>


            {% with person_list.1.name as n %}
                {{ n }}
                {{ n }}
                {{ n }}
                {{ n }}
            {% endwith %}


            <hr>
            <h4>自定义过滤器,标签</h4>

            {% load my_tag_filter %}
            <p>{{ i|multi_fliter:20 }}</p>

            {#<p>{% multi_tag 7 9 6 %}</p>#}


            {% if i|multi_fliter:10 > 100 %}
                <p>100</p>
            {% else %}
                <p>{{ i }}</p>
            {% endif %}


            {#{% if  multi_tag i 20 >100  %}#}
            {#<p>100</p>#}
            {#{% else %}#}
            {#<p>{{ i }}</p>#}
            {#{% endif %}#}


{% endblock %}